/*
 * MouseEventImp.h
 *
 *  Created on: Apr 18, 2009
 *      Author: wrice
 */

#ifndef MOUSEEVENTIMPL_H_
#define MOUSEEVENTIMPL_H_
#include "DOMEventImp.h"
namespace DOMEventImp {

class MouseEventImp : public UIEventImp, IMPLEMENTS( MouseEvent ) {
public:
	MouseEventImp(
			EventTarget * target,
			EventTarget * currentTarget,
			DOMString typeArg,
			bool canBubbleArg,
			bool cancelableArg,
			AbstractView * viewArg, long detailArg,
			long screenXArg, long screenYArg,
			long clientXArg, long clientYArg,
			bool ctrlKeyArg, bool altKeyArg,
			bool shiftKeyArg, bool metaKeyArg,
			unsigned short buttonArg,
			EventTarget * relatedTargetArg);
	virtual ~MouseEventImp() {}

	virtual void initMouseEvent(
			DOMString typeArg,
			bool canBubbleArg,
			bool cancelableArg,
			AbstractView * viewArg, long detailArg,
			long screenXArg, long screenYArg,
			long clientXArg, long clientYArg,
			bool ctrlKeyArg, bool altKeyArg,
			bool shiftKeyArg, bool metaKeyArg,
			unsigned short buttonArg,
			EventTarget * relatedTargetArg);

	virtual long getScreenX() const;
	virtual long getScreenY() const;
	virtual long getClientX() const;
	virtual long getClientY() const;
	virtual bool getCtrlKey() const;
	virtual bool getAltKey() const;
	virtual bool getShiftKey() const;
	virtual bool getMetaKey() const;
	virtual unsigned short getButton() const;
	virtual EventTarget * getRelatedTarget() const;

	static const DOMString EVENT_CLICK, EVENT_MOUSE_DOWN, EVENT_MOUSE_UP, EVENT_MOUSE_OVER, EVENT_MOUSE_MOVE, EVENT_MOUSE_OUT, EVENT_DBL_CLICK;

private:
	long screenX_;
	long screenY_;
	long clientX_;
	long clientY_;
	bool ctrlKey_;
	bool altKey_;
	bool shiftKey_;
	bool metaKey_;
	unsigned short button_;
	EventTarget * relatedTarget_;
};

}

#endif /* MOUSEEVENTIMPL_H_ */
